{% if active_tab != "ask" %}
{% spaceless %}
<div 
    id="searchBar"
    class="{% if query %}cancelable{% endif %}"
>
    {# url action depends on which tab is active #}
    {% if active_tab == "tags" %}
        <input type="hidden" name="t" value="tag"/>
        {% set query=stag %}
    {% elif active_tab == "users" %}
        <input type="hidden" name="t" value="user"/>
    {% endif %}
    <input 
        class="searchInput" 
        type="text" 
        autocomplete="off"
        value="{{ query|default_if_none('')|escape }}" 
        name="query" 
        id="keywords"
    />
    {% block tooltip %}
    {% endblock %}
</div>
{% endspaceless %}
{% else %}
    <div 
        id="searchBar"
        class="{% if query %}cancelable{% endif %}">
        {# url action depends on which tab is active #}
        {% if active_tab == "tags" %}
            <input type="hidden" name="t" value="tag"/>
            {% set query=stag %}
        {% elif active_tab == "users" %}
            <input type="hidden" name="t" value="user"/>
        {% endif %}
        <input 
            class="searchInput" 
            type="text" 
            autocomplete="off"
            value="{{ query|default_if_none('')|escape }}" 
            name="query" 
            id="keywords"
        />
        <div class="input-tool-tip">search or ask your question</div>
    </div>
{% endif %}